package com.zhaohang.cn.utils;

import android.view.Gravity;
import android.widget.Toast;

import com.zhaohang.cn.zhaohangapp.CompontApplayCation;


/**
 * Created by 赵航 on 2018/1/16.
 */

public class ToastMake {
    private static Toast toast=null;

    public static void showToast(String text){
        if (toast==null){
            toast = Toast.makeText(CompontApplayCation.context, text, Toast.LENGTH_LONG);
        }else {
            toast.setText(text);
        }
        toast.setGravity(Gravity.CENTER,0,0);
        toast.show();
    }
}
